<?php
class MessageController extends AdminBaseController {
	public function lists(){
		$data = $_GET;
		$where = array();
		if(isset($_GET['add_time'])){
			$where['add_time'] = strtotime($_GET['add_time']);
		}
		if(isset($_GET['add_user'])&&$_GET['add_user']!=""){
			$where['add_user'] = $_GET['add_user'];
		}
		$messageList = HttpServerManager::getMessageServer()->paging($where);
		foreach($messageList['list'] as $key=>$value){
			$messageList['list'][$key]['user_name'] = $value['email'];	
			$messageList['list'][$key]['phone'] =$value['phone'];	
		}
		
		$data['list'] = $messageList['list'];
		$data['page'] = $messageList['page'];
		return $data;
	}
	public function info (){
		return HttpDaoManager::getMessageDao()->get($_GET['id']);
	}
}
?>